NAME
signal - trap signals

SYNTAX
void signal(int sig, function(int:void) callback);
or
void signal(int sig);

DESCRIPTION
This function allows you to trap a signal and have a function called when the process receives a signal. Although it IS possible to trap SIGBUS, SIGSEGV etc. I advice you not to. Pike should not receive any such signals and if it does it is because of bugs in the Pike interperter. And all bugs should be reported, no matter how trifle.

The callback will receive the signal number as the only argument. See the document for the function 'kill' for a list of signals.

If no second argument is given, the signal handler for that signal is restored to the default handler.

If the second argument is zero, the signal will be completely ignored.

SEE ALSO
kill, signame and signum